package cn.starrysky108.simpleerp.sales.entity;

import cn.starrysky108.simpleerp.core.base.BaseEntity;
import cn.starrysky108.simpleerp.core.enums.OrderStatusEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.math.BigDecimal;

/**
 * <p>
 * 销售订单表
 * </p>
 *
 * @author Carl Lee
 * @since 2021-08-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("sales")
@ApiModel(value = "Sales对象", description = "销售订单表")
public class Sales extends BaseEntity {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "流水号")
    @TableField("serial_number")
    private String serialNumber;

    @ApiModelProperty(value = "销售员id")
    @TableField("salesperson_id")
    private Long salespersonId;

    @ApiModelProperty(value = "客户id")
    @TableField("client_id")
    private Long clientId;

    @ApiModelProperty(value = "管理员/审核人id")
    @TableField("administrator_id")
    private Long administratorId;

    @ApiModelProperty(value = "应付款")
    @TableField("payable")
    private BigDecimal payable;

    @ApiModelProperty(value = "优惠")
    @TableField("discount")
    private BigDecimal discount;

    @ApiModelProperty(value = "实际支付价格")
    @TableField("payment")
    private BigDecimal payment;


    @ApiModelProperty(value = "订单状态")
    @TableField("status")
    private OrderStatusEnum status;



}
